package com.bzs.batch.reconcile.scheduled;

import com.bzs.batch.reconcile.service.IHostTransactionflowService;
import lombok.AllArgsConstructor;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Classname Scheduled
 * @Author baozs
 * @Date 2021/12/30 8:42
 * @Version 1.0
 * @Description
 **/
@Component
@AllArgsConstructor
public class myScheduled {
    private final IHostTransactionflowService hostTransactionflowService;

    /*单机的定时任务使用Scheduled就可以满足。*/
    @Scheduled(cron = "0 0 19 * * ?")//每天19点
    //@Scheduled(cron = "0/1 * * * * ?")
    public void reconcileScheduled() {
        //System.out.println("定时任务定时任务定时任务定时任务");
        hostTransactionflowService.reconcile();
    }
}
